/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** 分页查询产品信息审核 GET /product_review */
export async function productReviewGetProductReviewPage({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ProductReviewGetProductReviewPageParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelResponseDataListModelProductReviewModel_>(
    '/product_review',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 产品信息审核 POST /product_review */
export async function productReviewProductReview({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ProductReviewProductReviewParams;
  body: API.ReviewProductModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/product_review', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 热门 PUT /product_review/sort */
export async function productReviewSort({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ProductReviewSortParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/product_review/sort', {
    method: 'PUT',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 置顶 PUT /product_review/top_up */
export async function productReviewTopUp({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ProductReviewTopUpParams;
  body: API.TopUpProductModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/product_review/top_up', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}
